package work20241210.a_String;

/**
 * @author zdl
 * @date 2024/12/10
 */
public class StringEndsWith {
    public static void main(String[] args) {
        String str = "张三";
        System.out.println(str.endsWith("三"));  //判断是否以指定字符结尾(后缀)
        char[] charArray = str.toCharArray();
        if (charArray[charArray.length - 1] == '三' ){
            System.out.println("TRUE");
        }else {
            System.out.println("FALSE");
        }
    }
}
